<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script src="../js/vue.js"></script>
   

    <div id="root">
        <input type="button" value="点击切换状态" @click="changefree()">
        <span v-if="num">true真, false否</span>
        <!-- <span v-show="num">true真, false否</span> -->
    </div>

    <script>
        var root = new Vue({
            el: "#root",
            data:{
                num: false,
            },
            methods: {
                changefree(){
                    this.num = !this.num
                }
            }
        })
    </script>
</body>
</html>
